//
//  DeviceManagerViewController.m
//  CityFire
//
//  Created by liuyangzhu on 2017/8/3.
//  Copyright © 2017年 刘养柱. All rights reserved.
//

#import "DeviceManagerViewController.h"
#import "DeviceManagerTableViewCell.h"
#import "DeviceManagerFooterView.h"

@interface DeviceManagerViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, weak) IBOutlet UITableView *deviceTableView;
@property (nonatomic, strong) DeviceManagerFooterView *footerView;

@end

@implementation DeviceManagerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = kDeviceManager_TITLE;

    
//    self.footerView = [[[NSBundle mainBundle] loadNibNamed:@"DeviceManagerFooterView" owner:nil options:nil] firstObject];
//    self.footerView.frame = CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 160);
//    
//    self.deviceTableView.tableFooterView = self.footerView;
}

#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 10;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 4;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    DeviceManagerTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"DeviceManagerTableViewCell"];
    
    
    return cell;
}

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    return [tableView dequeueReusableCellWithIdentifier:@"DeviceManagerFooterView"];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
